import Layout from '@/layout'

const powerRoutes = [
  {
    path: '/power',
    name: 'PowerInfo',
    component: Layout,
    redirect: '/power/trend',
    meta: {
      title: '用电水平',
      icon: 'level'
    },
    children: [
      {
        path: '/power/trend',
        name: 'Trend',
        // component: () => import('@/views/power/Trend'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/Trend')), 'power'),
        meta: {
          title: '用电趋势',
        },
      },
      {
        path: '/power/composition',
        name: 'Composition',
        // component: () => import('@/views/power/Composition'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/Composition')), 'power'),
        meta: {
          title: '用电构成（月）',
        },
      },
      {
        path: '/power/cycpower',
        name: 'CycPower',
        // component: () => import('@/views/power/CycPower'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/CycPower')), 'power'),
        meta: {
          title: '用电构成（周期）',
        },
      },
    ],
  },
  {
    path: '/powerdev',
    name: 'PowerDevices',
    component: Layout,
    meta: {
      title: '设备运行',
      icon: 'device-run'
    },
    redirect: '/powerdev/switchers',
    children: [
      {
        path: '/powerdev/switchers',
        name: 'Switchers',
        // component: () => import('@/views/power/devices/Switchers'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/devices/Switchers')), 'power'),
        meta: {
          title: '变压器运行',
        },
      },
      {
        path: '/powerdev/switcher',
        name: 'Switcher',
        // component: () => import('@/views/power/devices/Switcher'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/devices/Switcher')), 'power'),
        meta: {
          title: '变压器节能一',
        },
      },
      {
        path: '/powerdev/switcher1',
        name: 'Switcher1',
        // component: () => import('@/views/power/devices/Switcher1'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/devices/Switcher1')), 'power'),
        meta: {
          title: '变压器节能二',
        },
      },
    ],
  },
  {
    path: '/elecData',
    redirect: '/elecData/1',
    component: Layout,
    name: 'ElecData',
    meta: {
      title: '经济评估',
      icon: 'economy'
    },
    children: [
      {
        path: '/elecData/1',
        name: 'ElectData1',
        // component: () => import('@/views/power/ElecData/ElecData1'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/ElecData/ElecData1')), 'power'),
        meta: {
          title: '经济排名'
        }
      },
      {
        path: '/elecData/2',
        name: 'ElectData2',
        // component: () => import('@/views/power/ElecData/ElecData2'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/ElecData/ElecData2')), 'power'),
        meta: {
          title: '经济措施'
        }
      },
      {
        path: '/elecData/3',
        name: 'ElectData3',
        // component: () => import('@/views/power/ElecData/ElecData3'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/ElecData/ElecData3')), 'power'),
        meta: {
          title: '单项分析'
        }
      },
      {
        path: '/elecData/datainput',
        name: 'DataInput',
        // component: () => import('@/views/power/ElecData/DataInput'),
        component: resolve => require.ensure([], () => resolve(require('@/views/power/ElecData/DataInput')), 'power'),
        meta: {
          title: '电费单输入'
        }
      }
    ]
  }
]

export default powerRoutes;
